package gulimall.feign;

import gulimall.pojo.bo.UserLoginBO;
import gulimall.pojo.bo.UserRegBO;
import gulimall.pojo.vo.SocialUser;
import gulimall.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 远程调用会员服务的feign
 *
 * @author HLF
 * @date 2022/8/1 15:21
 */
@Service
@FeignClient(value = "gulimall-member", path = "/member")
public interface MemberFeignService {

    /**
     * 会员注册
     */
    @PostMapping("/member/regist")
    R regist(@RequestBody UserRegBO userRegBO);

    /**
     * 会员登录
     */
    @PostMapping("/member/login")
    R login(@RequestBody UserLoginBO userLoginBO);


    /**
     * 会员社交登录
     */
    @PostMapping("/member/oauth2/login")
    R oauth2Login(@RequestBody SocialUser socialUser);
}
